<!DOCTYPE HTML>
<html>
 <head>
  <title>后台管理系统</title>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link href="<?php echo CON_STATIC_URL; ?>zhsjr/admin/css/dpl-min.css" rel="stylesheet" type="text/css" />
   <link href="<?php echo CON_STATIC_URL; ?>zhsjr/admin/css/bui-min.css" rel="stylesheet" type="text/css" />
   <link href="<?php echo CON_STATIC_URL; ?>zhsjr/admin/css/main-min.css" rel="stylesheet" type="text/css" />
  
    
   
  <script type="text/javascript" src="<?php echo CON_STATIC_URL; ?>zhsjr/js/jquery.min.js"></script>
  <script type="text/javascript" src="<?php echo CON_STATIC_URL; ?>zhsjr/admin/js/bui-min.js"></script>
  <script type="text/javascript" src="<?php echo CON_STATIC_URL; ?>zhsjr/admin/js/common/main-min.js"></script>
  <script type="text/javascript" src="<?php echo CON_STATIC_URL; ?>zhsjr/admin/js/config-min.js"></script>
   <?php
	 $CI = & get_instance();
	 $CI->load->model('systemadmin_user_model');
	 $header_list = $CI->systemadmin_user_model->bar();
	 $admin = $header_list['admin'];
	 $header_list = $header_list['list'];
	 ?>
  <script>
    BUI.use('common/main',function(){
      var config = [
      <?php 
      $head = "";
      $function = "";
      foreach ($header_list as $k=>$v){
      	/*nav-permission,nav-storage,nav-inventory,nav-user,nav-order,nav-product,nav-supplier,nav-cost,nav-monitor,nav-gather,nav-distribution,
      	 * nav-goods,nav-register,nav-marketing,nav-package,nav-home,nav-product-certified,nav-quality-certified,nav-supplier-certified,nav-certification
      	 * nav-sample,nav-supplychain,
      	 * */
      		$head.="<li class='nav-item dl-selected'><div class='nav-item-inner nav-".$v['module']."'>".$v['name']."</div></li>";
      		
      		$function .=	"{id:'".$k."',homePage : '".$k."0',
			          	menu:[{text:'".$v['name']."',
			      			items:[";
      	 $i=0;
      	 foreach ($v['list'] as $lk=>$lv){
      	 	$function .= "{id:'".$k.$i."',text:'".$lv['linkname']."',href:'".$lv['link']."'},";
      	 	$i++;
      	 }
      	 $function = rtrim($function, ",");
      	 $function .= "]
				 }]
		      },";      	 
      }
      $function = rtrim($function, ",");
      echo $function;
      ?>
      ];
      new PageUtil.MainPage({
        modulesConfig : config
      });
    });
  </script>
  
 </head>
 <body>

  <div class="header">
    
      <div class="dl-title">
       <!--<img src="/chinapost/Public/assets/img/top.png">-->
      </div>

    <div class="dl-log">欢迎您，<span class="dl-log-user"><?php echo $admin['adminname'];?></span><a href="/sys_admin/logout" title="退出系统" class="dl-log-quit">[退出]</a>
    </div>
  </div>
   <div class="content">
    <div class="dl-main-nav">
      <div class="dl-inform"><div class="dl-inform-title"><s class="dl-inform-icon dl-up"></s></div></div>
      <ul id="J_Nav"  class="nav-list ks-clear">
        		<?php echo $head;?>
      </ul>
    </div>

    <ul id="J_NavContent" class="dl-tab-conten">

    </ul>
   </div>
  
 </body>
</html>
